package cn.xttc.edu.mapper;

import cn.xttc.edu.entity.ExpenseRule;
import cn.xttc.edu.entity.vo.CarTypeVo;
import cn.xttc.edu.entity.vo.RuleVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 杨磊
 * @since 2022-02-27
 */
public interface ExpenseRuleMapper extends BaseMapper<ExpenseRule> {

    /**
     * 获取所有规则，分页显示
     * @param page 分页参数
     * @return IPage的实现类对象
     */
    IPage<RuleVo> pageGetAll(@Param("page") Page<RuleVo> page);

    /**
     * 根据typeId查询ruleVo对象
     * @param typeId 类型id
     * @return RuleVo对象
     */
    RuleVo getOneByTypeId(Integer typeId);
}
